#ifndef  Single_h_h_h
#define  Single_h_h_h


namespace XE
{



	template<typename T>
	class Single
	{
	public:
		Single()
		{

			m_pSingle = static_cast<T*>(this);
		}
		static T* GetSingle()
		{ 
			assert(m_pSingle); 
			return m_pSingle;
		}


		virtual  ~Single(){}
		/*{
		if(m_pSingle)
		{
		delete m_pSingle;
		m_pSingle = 0;
		}
		}*/



	protected:
		static T* m_pSingle;




	};



}

















#endif